Skip to content

feat: return message ID from Outlook send_email#113

Open
dimavedenyapin wants to merge 2 commits intomainfrom
feat/outlook-send-return-message-id
Open

feat: return message ID from Outlook send_email#113
dimavedenyapin wants to merge 2 commits intomainfrom
feat/outlook-send-return-message-id

Conversation

@dimavedenyapin
Copy link
Copy Markdown

Summary

  • Changed Outlook send_email to use create-draft-then-send pattern (POST /me/messagesPOST /me/messages/{id}/send) instead of POST /me/sendMail
  • This captures the Graph messageId and internetMessageId (RFC 2822), returned in the tool response as structured JSON
  • Enables downstream delivery tracking via Microsoft Graph change notification subscriptions (handled in workflow-builder)

Motivation

The existing sendMail endpoint returns 202 with no body — no way to get a message ID. The create-draft approach gives us the ID before sending, which is required for email deliverability tracking (bounce/open/click events).

Test plan

  • Verify Outlook send_email still sends emails correctly
  • Verify response JSON contains messageId and internetMessageId
  • Verify backwards-compatible with existing MCP tool callers

🤖 Generated with Claude Code

dimavedenyapin and others added 2 commits March 26, 2026 23:13
Use create-draft-then-send pattern instead of sendMail so we can
capture the Graph messageId and internetMessageId. This enables
downstream delivery tracking (bounce/open/click events) via
Microsoft Graph change notification subscriptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant